module.exports = {
  apps: [{
    name: 'redis_test',
    script: './service/redis.js',
    watch: false,
    env: {
      COMMON_VARIABLE: true,
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production'
    }
  }],
  deploy: {
    production: {
      user: 'root',
      host: '47.98.161.133',
      ref: 'origin/master',
      repo: 'git@gitee.com:zwzjoker/redis.git',
      path: '/www/trailer/test',
      ssh_options: 'StrictHostKeyChecking=no',
      'pre-deploy': 'git fetch',
      'post-deploy': 'npm install && pm2 startOrRestart ecosystem.config.js --env production'
    }
  }
}
